package es.shinra.app.BBDD.Object.DAO;

import es.shinra.app.BBDD.Object.Content;
import es.shinra.app.BBDD.Object.iContent;


/**
 * ActionResult.
 * @author Huchnet.
 */
public class DBActionResult implements iDBActionResult {

    private iContent aContent;
    private String errorMsg;
    private Throwable exception;
    private String aResult=null;
    private Object itemDescriptor=null;

    public DBActionResult() {
        errorMsg = "No Error";
        exception = null;
        aContent = new Content();
    }

    public boolean isOk() {
        if (errorMsg.equalsIgnoreCase("No Error")) {
            return true;
        } else {
            return false;
        }
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public Throwable getException() {
        return exception;
    }

    public iContent getResult() {
        return aContent;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public void setException(Throwable exception) {
        this.exception = exception;
    }

    public void setResult(iContent aContent) {
        this.aContent = aContent;
    }

    public void setStringResult(String aResult) {
        this.aResult=aResult;
    }

    public String getStringResult() {
        return aResult;
    }

    public void setItemDescriptor(Object itemDescriptor) {
        this.itemDescriptor=itemDescriptor;
    }

    public Object getItemDescriptor() {
        return itemDescriptor;
    }
}

